package com.jeasonzhao.report.codes;

import com.jeasonzhao.commons.basic.IntegerPair;

public final class CacheTimeUnits extends IntegerPair
{
    private static final long serialVersionUID = 1L;
    public static final CacheTimeUnits None = new CacheTimeUnits( -1,null);
    public static final CacheTimeUnits Year = new CacheTimeUnits(0,"y");
    public static final CacheTimeUnits Month = new CacheTimeUnits(1,"m");
    public static final CacheTimeUnits Week = new CacheTimeUnits(2,"w");
    public static final CacheTimeUnits Date = new CacheTimeUnits(3,"d");
    public static final CacheTimeUnits Hour = new CacheTimeUnits(4,"h");
    public static final CacheTimeUnits Session = new CacheTimeUnits(5,"page,p");
    public int hashCode()
    {
        return super.hashCode();
    }

    protected CacheTimeUnits(int nId,String strAlias)
    {
        super(nId,null,strAlias);
    }

    public static CacheTimeUnits fromName(String strName)
    {
        return(CacheTimeUnits) IntegerPair.findConstant(CacheTimeUnits.class,strName,None);
    }

}
